On a lark, to learn more about how 3D graphics are implemented, I started rewriting the C code in a textbook several years ago. Here are the header comments:
# model3d.icn - rudimentary 3-d modelling with Gnuplot output
# The basic approach is borrowed from "High-Resolution Computer
# Graphics Using C" by Ian Angell (Wiley/Halstead, 1990). However,
# since this is Icon, the code is much clearer, the data structures
# are simpler, and I haven't shrunk from changing some routines into
# functions returning structured values to the point of invocation.
# Gnuplot is the output "device". There is no interface with any other
# hardware, nor any attempt to format for any other plotting language.
# If you don't have gnuplot installed, get it. You're going to need
# it.
What is there is crude. It has worked fine on my limited testing, but as yet there is no interactivity, no animation, not much color (lines only), and no surface textures. These could be added, but I haven't had much time to work on it in a couple of years. It could easily be modified to emit PostScript or VRML as well as Gnuplot. If this sounds interesting (to anybody) as a basis for further work, I could post what I have to a friendly FTP site (due to exigencies beyond my control, I cannot keep mine up 24 hours a day).
Let me know if you want a copy.
Cheers,
Charles Hethcoat
>>> <rjhare@ed.ac.uk> 99-04-06 10:32:53 AM >>>
...anyone used Icon to create a `basic' visualisation suite which could handle
(say) `stick and ball' molecular models or vector/streamline visualisation?
I can't see anything `obvious' in the IPL which maps to this.